import request from '@/utils/request'

// 询价定金微信支付接口
export function Wxpayment (data) {
  return request({
    url: '/bidEvent/saveAll',
    method: 'post',
    data: data
  })
}

// 询价支付接口
export function BidingPayment (data) {
  return request({
    url: '/bidEvent/saveAll',
    method: 'post',
    data: data
  })
}

// 询价下单支付接口  然后转入订单
export function bidWxplaceOrder (data) {
  return request({
    url: '/bidEvent/saveCarOrderFromBidCar',
    method: 'post',
    data: data
  })
}

// 拼单下单支付接口  然后转入订单
export function crowdWxplaceOrder (data) {
  return request({
    url: '/shareBill/saveCarOrderFromShareBill',
    method: 'post',
    data: data
  })
}

// 用户直接拼单，没有参与询价
export function crowdOrder (data) {
  return request({
    url: '/shareBill/saveShareBill',
    method: 'post',
    data: data
  })
}

// 支付宝支付
export function aliPay (orderNo) {
  return request({
    url: '/aliPay/makePreOrder',
    method: 'post',
    data: {
      orderNo: orderNo
    }
  })
}

// 微信支付
export function wxPay (orderNo) {
  return request({
    url: '/wxPay/makePreOrder',
    method: 'post',
    data: {
      orderNo: orderNo
    }
  })
}

//拼单转订单v2
export function crowdWxplaceOrderV2(data) {
  return request({
    url: '/shareBill/v2/saveCarOrderFromShareBill',
    method: 'post',
    data: data
  })
}

